package com.qzsf.backend.entity;

import com.qzsf.backend.dto.FeedbackCreateDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/*
 * @Author: Dennis Chen
 * @CreateTime: 2024/10/30 16:17 周三
 * @Email 1429278462@qq.com
 * @Remark 用户参与活动反馈实体类
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Feedback implements Serializable {
    private int id;
    private int userId;
    private int eventId;
    private int rating;
    private String content;

    public Feedback(int userId, FeedbackCreateDTO feedbackCreateDTO){
        this.userId = userId;
        this.eventId = feedbackCreateDTO.getEventId();
        this.rating = feedbackCreateDTO.getRating();
        this.content = feedbackCreateDTO.getContent();
    }
}
